import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Login from '@/components/Login'
import Home from '@/components/Home'
import CityManager from '@/components/CityManager'
import HotelManager from '@/components/HotelManager'
import RoomManager from '@/components/RoomManager'
import RoomPriceManager from '@/components/RoomPriceManager'
import SysUserManager from '@/components/SysUserManager'
import SysRoleManager from '@/components/SysRoleManager'
import SysPowerManager from '@/components/SysPowerManager'
import CouponTemplate from '@/components/CouponTemplate'
import CouponManager from '@/components/CouponManager'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/Home',
      name: 'Home',
      component: Home,
      //进行子路由的跳转
      children: [{
          path: '/CityManager',
          component: CityManager
        }, {
          path: '/HotelManager',
          component: HotelManager
        }, {
          path: '/RoomManager',
          component: RoomManager
        }, {
          path: '/RoomPriceManager',
          component: RoomPriceManager
        }, {
          path: '/SysUserManager',
          component: SysUserManager
        },
        {
          path: '/SysRoleManager',
          component: SysRoleManager
        },
        {
          path: '/SysPowerManager',
          component: SysPowerManager
        },
        {
          path: '/CouponTemp',
          component: CouponTemplate
        },
        {
          path: '/Coupon',
          component: CouponManager
        }
      ]
    }
  ]
})
